{% extends "base.html" %}

{% block title %}Admin Dashboard - Volunteer Platform{% endblock %}

{% block content %}
<div class="dashboard-container">
    <div class="sidebar">
        <nav class="dashboard-nav">
            <ul>
                <li class="active"><a href="{{ url_for('admin_dashboard') }}">Dashboard</a></li>
                <li><a href="{{ url_for('admin_users') }}">User Management</a></li>
                <li><a href="{{ url_for('admin_activities') }}">Activity Approval</a></li>
            </ul>
        </nav>
    </div>

    <div class="main-content">
        <h1>Admin Dashboard</h1>
        
        <div class="stats-grid">
            <div class="stat-card">
                <h3>Total Users</h3>
                <p class="stat-number">{{ stats.total_users }}</p>
            </div>
            <div class="stat-card">
                <h3>Pending Users</h3>
                <p class="stat-number">{{ stats.pending_users }}</p>
            </div>
            <div class="stat-card">
                <h3>Total Activities</h3>
                <p class="stat-number">{{ stats.total_activities }}</p>
            </div>
            <div class="stat-card">
                <h3>Pending Activities</h3>
                <p class="stat-number">{{ stats.pending_activities }}</p>
            </div>
        </div>

        <div class="recent-section">
            <h2>Recently Registered Users</h2>
            <table class="data-table">
                <thead>
                    <tr>
                        <th>Username</th>
                        <th>Email</th>
                        <th>Role</th>
                        <th>Registration Time</th>
                        <th>Status</th>
                    </tr>
                </thead>
                <tbody>
                    {% for user in recent_users %}
                    <tr>
                        <td>{{ user.name }}</td>
                        <td>{{ user.email }}</td>
                        <td>{{ user.role }}</td>
                        <td>{{ user.created_at.strftime('%Y-%m-%d %H:%M') }}</td>
                        <td>{{ user.status }}</td>
                    </tr>
                    {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</div>
{% endblock %} 